package design;

public abstract class Flyweight
{
    //内部状态
    public String intrinsic;

    //外部状态
    protected final String extrinsic;

    public Flyweight(String extrinsic)
    {
        this.extrinsic = extrinsic;
    }

    //定义业务操作
    public abstract void operate(int extrinsic);

    public String getIntrinsic()
    {
        return intrinsic;
    }

    public void setIntrinsic(String intrinsic)
    {
        this.intrinsic = intrinsic;
    }
}
